package com.zhonghui.scm.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zhonghui.scm.mapper.ScmPurchasingPlanMapper;
import com.zhonghui.scm.domain.ScmPurchasingPlan;
import com.zhonghui.scm.service.IScmPurchasingPlanService;

/**
 * 供应链SCM-采购管理-采购计划Service业务层处理
 * 
 * @author qiezhi
 * @date 2023-12-20
 */
@Service
public class ScmPurchasingPlanServiceImpl implements IScmPurchasingPlanService 
{
    @Autowired
    private ScmPurchasingPlanMapper scmPurchasingPlanMapper;

    /**
     * 查询供应链SCM-采购管理-采购计划
     * 
     * @param id 供应链SCM-采购管理-采购计划主键
     * @return 供应链SCM-采购管理-采购计划
     */
    @Override
    public ScmPurchasingPlan selectScmPurchasingPlanById(Long id)
    {
        return scmPurchasingPlanMapper.selectScmPurchasingPlanById(id);
    }

    /**
     * 查询供应链SCM-采购管理-采购计划列表
     * 
     * @param scmPurchasingPlan 供应链SCM-采购管理-采购计划
     * @return 供应链SCM-采购管理-采购计划
     */
    @Override
    public List<ScmPurchasingPlan> selectScmPurchasingPlanList(ScmPurchasingPlan scmPurchasingPlan)
    {
        return scmPurchasingPlanMapper.selectScmPurchasingPlanList(scmPurchasingPlan);
    }

    /**
     * 新增供应链SCM-采购管理-采购计划
     * 
     * @param scmPurchasingPlan 供应链SCM-采购管理-采购计划
     * @return 结果
     */
    @Override
    public int insertScmPurchasingPlan(ScmPurchasingPlan scmPurchasingPlan)
    {
        return scmPurchasingPlanMapper.insertScmPurchasingPlan(scmPurchasingPlan);
    }

    /**
     * 修改供应链SCM-采购管理-采购计划
     * 
     * @param scmPurchasingPlan 供应链SCM-采购管理-采购计划
     * @return 结果
     */
    @Override
    public int updateScmPurchasingPlan(ScmPurchasingPlan scmPurchasingPlan)
    {
        return scmPurchasingPlanMapper.updateScmPurchasingPlan(scmPurchasingPlan);
    }

    /**
     * 批量删除供应链SCM-采购管理-采购计划
     * 
     * @param ids 需要删除的供应链SCM-采购管理-采购计划主键
     * @return 结果
     */
    @Override
    public int deleteScmPurchasingPlanByIds(Long[] ids)
    {
        return scmPurchasingPlanMapper.deleteScmPurchasingPlanByIds(ids);
    }

    /**
     * 删除供应链SCM-采购管理-采购计划信息
     * 
     * @param id 供应链SCM-采购管理-采购计划主键
     * @return 结果
     */
    @Override
    public int deleteScmPurchasingPlanById(Long id)
    {
        return scmPurchasingPlanMapper.deleteScmPurchasingPlanById(id);
    }
}
